local yingwu = fk.CreateSkill({
  name = "mini_mou__yingwu",
})

Fk:loadTranslationTable{
  ["mini_mou__yingwu"] = "莺舞",
  [":mini_mou__yingwu"] = "当你使用普通锦囊牌指定一个目标后，若你拥有技能〖掠影〗，你获得一个“椎”标记。<br>"..
  "当你使用普通锦囊牌结算结束后，若你拥有至少两个“椎”标记，则你移去两个“椎”标记，摸一张牌，然后可以视为使用一张无距离次数限制的【杀】。",

  ["#mini_mou__yingwu-use"] = "莺舞：你可以视为使用一张无距离次数限制的【杀】",

  ["$mini_mou__yingwu1"] = "尔等来的正好，看剑！",
  ["$mini_mou__yingwu2"] = "定叫汝命丧此剑之下！",
}

yingwu:addEffect(fk.TargetSpecified, {
  mute = true,
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(yingwu.name) and
      player:hasSkill("mini_mou__lueying", true) and data.card:isCommonTrick()
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    player.room:addPlayerMark(player, "@mini_mou__lueying_hit")
  end,
})

yingwu:addEffect(fk.CardUseFinished, {
  anim_type = "offensive",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(yingwu.name) and
      data.card:isCommonTrick() and player:getMark("@mini_mou__lueying_hit") > 1
  end,
  on_cost = Util.TrueFunc,
  on_use = function(self, event, target, player, data)
    local room = player.room
    room:removePlayerMark(player, "@mini_mou__lueying_hit", 2)
    player:drawCards(1, yingwu.name)
    if player.dead then return end
    room:askToUseVirtualCard(player, {
      name = "slash",
      skill_name = yingwu.name,
      prompt = "#mini_mou__yingwu-use",
      cancelable = true,
      extra_data = {
        bypass_distances = true,
        bypass_times = true,
        extraUse = true,
      },
    })
  end,
})

return yingwu
